The objective of this proposal is to demonstrate the feasibility of a novel pixel structure to realize avalanche gain and ultrafast radiation sensing fo direct conversion amorphous selenium (a-Se) x-ray detectors. The proposed detector, which we call field-Shaping multi-Well Avalanche Detector (SWAD), employs three major components: a readout electronic circuit (TFT array for energy integration detector; or CMOS detector with photon counting) identical to existing products; an integrated multi- well structure with embedded field-shaping grids built on top of each pixel; and deposition of a direct conversion a-Se photoconductive layer with thickness ranging from 200 to 1000 m, also identical to existing products. The key innovations are the following: 1) localizing the avalanche gain within a thin region inside a thick a-Se bulk using a high-density multi-well structure over the pixel electrode of the readout circuit; 2) embedding multiple layers of grid electrodes inside the walls of each well for optimal electric field shaping; 3) enabling quantum noise limited operation at low dose for energy integration (EI) detector and fast response for single photon counting (PC). Our objective will be achieved through two specific aims: 1) Design and fabricate prototype SWAD pixel detectors; 2) Characterize the performance of prototype SWAD with different pixel designs and demonstrate fast signal response and high energy resolution. Successful accomplishment of these specific aims will prove the feasibility of a direct conversion a-Se detector structure wih a localized region of avalanche gain, and pave the way for future development of prototype detectors. These can be either energy integration or photon counting detectors for high resolution and low dose x-ray imaging applications such as breast imaging.